package csdn;

public class Core {
    public static void main(String[] args){
        AddThread first = new AddThread();
        AddThread second = new AddThread();
        
        Thread one = new Thread(first);
        Thread two = new Thread(second);
        one.setName("firstThread");
        two.setName("secondThread");
        
        one.start();
        two.start();
        
        while(one.isAlive()||two.isAlive()){
            
        }
        
        System.out.println(AddThread.getSum());
        
    }

}


